<!--<?php
if($action=='banuser'){print <<<EOT
-->
<div style="width:450px;">
<form action="masingle.php?action=banuser&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>会员禁言</div>
<table width="100%" class="mb5 z vt">
	<tr class="tr3"><td width="70">禁言对象：</td>
		<td>$userinfo[username]
<!--
EOT;
if($showTips){print <<<EOT
-->
<span class="s1">（该用户为 <b>{$userLevel}</b>，
<!--
EOT;
if($otherGroups){print <<<EOT
-->
	隐含 <b>$otherGroups</b> 用户组头衔
<!--
EOT;
}print <<<EOT
-->
请确认是否要禁言）</span>
<!--
EOT;
}
print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr3">
		<td>禁言范围：</td>
		<td><label class="mr20"><input type="radio" name="range" value="0" checked />{$forum[$fid][name]}</label>
<!--
EOT;
if($isGM || $SYSTEM['banuser']==2){print <<<EOT
-->
				<label class="mr20"><input type="radio" name="range" value="1" />全局禁言</label>
<!--
EOT;
if ($SYSTEM[banuserip]){print <<<EOT
-->
				<label><input type="checkbox" name="banip" value="1" /> 禁止该 IP</label>
<!--
EOT;
}}print <<<EOT
-->
		</ul>
		</td>
	</tr>
	<tr class="tr3">
		<td>禁言类型：</td>
		<td><label class="mr20"><input type="radio" name="type" value="1" checked />定期禁言</label>
<!--
EOT;
if($isGM || $SYSTEM['bantype']){print <<<EOT
-->
			<label><input type="radio" name="type" value="2" />永久禁言</label>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr3">
		<td>禁言时间：</td>
		<td><input class="input" type="text" name="limit" value="1" size="5" /> 天(最大天数<span class="s1">$pwBanMax</span>天)</td>
	</tr>
	<tr class="tr3">
		<td>删除主题：</td>
		<td>
			<label class="mr20"><input type="radio" name="deltopic" value="0" checked />不删除</label>
			<label class="mr20"><input type="radio" name="deltopic" value="1" />当前主题</label>
			<label class="mr20"><input type="radio" name="deltopic" value="2" />所有主题</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>消息通知：</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />开启</label>
			<label><input type="radio" name="ifmsg" value="0" />关闭</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>操作原因:</td>
		<td><p><input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" /></p>
	<!--
	EOT;
	if($db_adminreason){print <<<EOT
	-->
			<div class="mb5"><select name="" size="6" onchange="this.form.atc_content.value=this.value" style="width:320px">$reason_sel</select></div>
	<!--
	EOT;
	}print <<<EOT
	-->
		</td>
	</tr>
</table>
<input type="hidden" name="uid" value="$uid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="step" value="3" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="masingle(this.form);">提 交</button></span></span></div></form>
</div>
<script type="text/javascript">
masingle = function(fp){
	var reasion = '$SYSTEM[enterreason]';
	if(reasion == 1 && fp['atc_content'].value == ""){
		ajax.showError('请输入操作原因！');return false;
	}
    ajax.submit(fp);
}
</script>
<!--
EOT;
}elseif($action=='banfree'){print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=banfree&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>会员解禁</div>
<table width="100%" class="mb5 z vt">
	<tr class="tr3"><td width="70">解禁对象：</td>
		<td>$userinfo[username]</td>
	</tr>
	<tr class="tr3">
		<td>消息通知</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />开启</label>
			<label><input type="radio" name="ifmsg" value="0" />关闭</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>解禁理由：</td>
		<td><textarea name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="textareaA"></textarea></td>
	</tr>
</table>
<input type="hidden" name="uid" value="$uid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="step" value="3" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='shield'){print <<<EOT
-->
<form action="masingle.php?action=$action&ajax=1" method="post">
<div style="width:450px;">
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>帖子屏蔽</div>
<input type="hidden" name="verify" value="$verifyhash" />
<table width="100%" class="vt z mb5">
	<tr class="tr3">
		<td class="tar">屏蔽数量</td>
		<td>$count 篇</td>
	</tr>
	<tr class="tr3"><td class="tar">操作类型:</td>
		<td><input type="radio" name="step" value="3" checked />屏蔽
			<input type="radio" name="step" value="5" />取消屏蔽 
		</td>
	</tr>
	<tr class="tr3"><td class="tar">消息通知:</td>
		<td><input type="radio" name="ifmsg" value="1" checked />开启
			<input type="radio" name="ifmsg" value="0" />关闭
		</td>
	</tr>
	<tr id="ok3" class="tr3">
		<td>屏蔽理由:</td>
		<td>
			<input type="text" class="input" style="width:312px;" name="atc_content" id="atc_content" onkeydown="ajax.quickpost(event,this.form)" />
			<div>
			<select onchange="this.form.atc_content.value=this.value;" style="width:320px;" size="6">
				$reason_sel
			</select>
			</div>
			<div>
				<div id="atc_content_warn" class="gray">限100字节</div>
			</div>
		</td>
	</tr>
</table>
</div>
<div class="popBottom">
<span class="btn2"><span>
<button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button>
</span></span></div>
<!--
EOT;
foreach($postdb as $value){
print <<<EOT
-->
<input type="hidden" name="selid[]" value="{$value['pid']}" />
<!--
EOT;
}print <<<EOT
-->
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="page" value="$page" />
</form>
<script>
onReady(function(){
	initCheckTextNum('atc_content','atc_content_warn', 100);
})
</script>
<!--
EOT;
} elseif ($action == 'viewip') {print <<<EOT
-->
<div>
	<div class="p10">IP:$readdb[userip] - 来自:$readdb[ipfrom]</div>
<!--
EOT;
	if (in_array($readdb['userip'], $bannedIps)) {print <<<EOT
-->
	<div class="popBottom">此IP已禁止<a href="javascript:" onclick="sendmsg('masingle.php?action=banuserip&fid=$fid&tid=$tid&pid=$pid&ajax=1&restore=1', '');return false;" class="s4">[恢复]</a></div>
<!--
EOT;
	} else {print <<<EOT
-->
	<div class="popBottom"><a href="javascript:" onclick="sendmsg('masingle.php?action=banuserip&fid=$fid&tid=$tid&pid=$pid&ajax=1', '');return false;" class="s4">[禁止此IP]</a></div>
<!--
EOT;
	}print <<<EOT
-->
</div>
<!--
EOT;
}elseif($action=='banuserip'){print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=banuserip&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="step" value="3" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>禁止ip</div>
<table width="100" class="mb5 vt z">
	<tr class="tr3"><td width="70">用户名:</td>
<!--
EOT;
if($readdb['anonymous'] && !$isGM && !pwRights($isBM,'anonyhide')){ print <<<EOT
-->
		<td>$db_anonymousname</td>
<!--
EOT;
}else{ print <<<EOT
-->
		<td>$readdb[username]</td>
<!--
EOT;
} print <<<EOT
-->
	</tr>
	<tr class="tr3">
		<td>操作原因:</td>
		<td>
		<input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" />
			<div><select style="width:320px;" onchange="this.form.atc_content.value=this.value" size="6">
				{$reason_sel}
			</select></div>
		</td>
	</tr>
</table>
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='bansignature'){ print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=bansignature&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>禁止帖子签名</div>
<table width="100" class="mb5 vt z">
	<tr class="tr3"><td width="70">操作对象:</td>
<!--
EOT;
if($readdb['anonymous'] && !$isGM && !pwRights($isBM,'anonyhide')){ print <<<EOT
-->
		<td>$db_anonymousname</td>
<!--
EOT;
}else{ print <<<EOT
-->
		<td>$readdb[username]</td>
<!--
EOT;
} print <<<EOT
-->
	</tr>
	<tr class="tr3">
		<td>禁止类型:</td>
		<td><label class="mr20"><input type="radio" name="step" value="3" $check_Y />禁止</label>
			<label><input type="radio" name="step" value="5" $check_N />解除</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>消息通知:</td>
		<td><label class="mr20"><input type="radio" name="ifmsg" value="1" checked />开启</label>
			<label><input type="radio" name="ifmsg" value="0" />关闭</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>操作原因:</td>
		<td>
		<input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" />
			<div><select style="width:320px;" size="6" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></div>
		</td>
	</tr>
</table>
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="page" value="$page" />
<div class="popBottom"><span class="btn2"><span><button type="button"  name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='remind'){ print <<<EOT
-->
<form action="masingle.php?action=$action&ajax=1" method="post">
<div style="width:450px;">
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>帖子提醒</div>
<input type="hidden" name="verify" value="$verifyhash" />
<table width="100%" class="vt z mb5">
	<tr class="tr3">
		<td class="tar">提醒数量</td>
		<td>$count 篇</td>
	</tr>
	<tr class="tr3"><td class="tar">操作类型:</td>
		<td><input type="radio" name="step" value="3" checked />提醒
			<input type="radio" name="step" value="5" />取消提醒
		</td>
	</tr>
	<tr class="tr3"><td class="tar">消息通知:</td>
		<td><input type="radio" name="ifmsg" value="1" checked />开启
			<input type="radio" name="ifmsg" value="0" />关闭
		</td>
	</tr>
	<tr id="ok3" class="tr3">
		<td>提醒理由:</td>
		<td>
			<input type="text" class="input" style="width:312px;" name="atc_content" id="atc_content" onkeydown="ajax.quickpost(event,this.form)" />
			<div class="mb5">
			<select onchange="this.form.atc_content.value=this.value;" style="width:320px;" size="6" class="mb5">
				$reason_sel
			</select>
			</div>
			<div>
				
				<div id="atc_content_warn" class="gray">限100字节</div>
			</div>
		</td>
	</tr>
</table>
</div>
<div class="popBottom">
<span class="btn2"><span>
<button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button>
</span></span></div>
<!--
EOT;
foreach($postdb as $value){
print <<<EOT
-->
<input type="hidden" name="selid[]" value="{$value['pid']}" />
<!--
EOT;
}print <<<EOT
-->
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="page" value="$page" />
</form>
<script>
onReady(function(){
	initCheckTextNum('atc_content','atc_content_warn', 100);
})
</script>
<!--
EOT;
}elseif($action=='split'){print <<<EOT
-->
<form action="masingle.php?action=split&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="step" value="3" />
<!--
EOT;
foreach($selid as $key=>$val){print <<<EOT
-->
<input type="hidden" name="selid[]" value="$val" />
<!--
EOT;
}print <<<EOT
-->
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>拆分操作</div>
<script>
function splitds() {
	var val = document.getElementsByName('splittype');
	var type;
	for(var i = 0; i< val.length; i++){
     if(val[i].checked){
      	if (val[i].value== 1){ 
	  		type = 1;
	 	 }else {
		 	type = 0;
		 }
	  }
    }
	var stitle = document.getElementById('splittitle');
	var sid = document.getElementById('splitid');
	if(type == 1){
		stitle.style.display = 'none';
		sid.style.display = '';
	}else{
		stitle.style.display = '';
		sid.style.display = 'none';
	}

}
</script>
<table width="100%" class="vt z">
	<tr class="tr3"><td width="70">拆分数量</td><td>$splitNum 篇</td></tr>
<tr class="tr3">
	<td width="80">拆分目标:</td>
	<td><input name="splittype" onclick="splitds()" type="radio" checked="checked" value="0" />新帖&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input name="splittype" onclick="splitds()" type="radio" value="1" />合并到帖子
	</td>
</tr>
<tr class="tr3" id="splittitle">
	<td width="80">新帖标题:</td>
	<td><input name="splittitle" class="input" size="50" />
	</td>
</tr>
<tr class="tr3" id="splitid" style="display:none;">
	<td width="80">帖子ID:</td>
	<td><input name="splitid" class="input" size="10" />
	</td>
</tr>
<tr class="tr3">
		<td>消息通知</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />开启</label>
			<label><input type="radio" name="ifmsg" value="0" />关闭</label>
		</td>
	</tr>
	<tr class="tr3"><td>操作原因::</td>
		<td>
		<input type="text" name="atc_content" onkeydown="ajax.quickpost(event,this.form)" class="input" style="width:312px;" />
		<div><select style="width:320px;" size="6" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></div>
		</td>
	</tr>
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='delatc'){print <<<EOT
--><div style="width:450px;">
<form action="masingle.php?action=delatc&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="step" value="3" />
<!--
EOT;
foreach($threaddb as $key=>$val){print <<<EOT
-->
<input type="hidden" name="selid[]" value="$val[pid]" />
<!--
EOT;
}print <<<EOT
-->
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>删除回复操作</div>
<table width="100%" class="mb5 vt z">
	<tr class="tr3"><td width="70">删除数量:</td><td>$count 篇</td></tr>
	<tr class="tr3">
		<td>扣除积分:</td>
		<td>
			<label class="mr20"><input type="radio" name="ifdel" value="1" checked />开启</label>
			<label><input type="radio" name="ifdel" value="0" />关闭</label>
		</td>
	</tr>
	<tr class="tr3">
		<td>消息通知</td>
		<td>
			<label class="mr20"><input type="radio" name="ifmsg" value="1" checked />开启</label>
			<label><input type="radio" name="ifmsg" value="0" />关闭</label>
		</td>
	</tr>
	<tr class="tr3"><td>操作原因:</td>
		<td>
		<input type="text" name="atc_content" class="input" style="width:312px;" onkeydown="ajax.quickpost(event,this.form)" />
		<div><select style="width:320px;" size="6" onchange="this.form.atc_content.value=this.value">
				$reason_sel
			</select></div>
		</td>
	</tr>
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,ajax.get);">提 交</button></span></span></div></form>
</div>
<!--
EOT;
}elseif($action=='pingcp'){print <<<EOT
--><div style="width:580px;">
<form action="masingle.php?action=$action&ajax=1" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="tid" value="$tid" />
<input type="hidden" name="pid" value="$pid" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="rpage" value="$rpage" />
<input type="hidden" name="step" value="2" />
<div class="popTop" style="cursor:move" onmousedown="read.move(event);"><span class="adel cp" onclick="closep();">关闭</span>评分记录管理</div>
<div>
<table width="100%" class="mb5 vt z">
	<tr class="tr3 s4">
		<td width="30">选择</td>
		<td width="90">操作者</td>
		<td width="70">积分情况</td>
		<td width="23%">评分时间</td>
		<td>评分理由</td>
	</tr>
<script>
function cutStrContent(obj){
	if(strlen(getObj(obj).value) > 100 ) {
		getObj(obj).value = substr(getObj(obj).value,100);
		alert ('评分理由请不要超过100字节');
	}
}

</script>
<!--
EOT;
foreach($pingdb as $val){print<<<EOT
-->
	<tr class="tr3">
		<td><input type="checkbox" name="selid[]" value="$val[id]"></td>
		<td>$val[pinger]</td>
		<td>$val[name] $val[point]</td>
		<td>$val[pingdate]</td>
		<td title="双击修改评分记录" ondblclick="editrecord('$val[id]')"><span id="ping_$val[id]">$val[record]</span><span id="edit_$val[id]" style="display:none"><input type="text" class="input input_wa" id="editbox_$val[id]" value="$val[record]" onchange="cutStrContent(this.id);" onkeyup="cutStrContent(this.id);" onkeydown="cutStrContent(this.id);"> <img title="保存" alt="保存" onclick="savePingLog('$val[id]');" src="$imgpath/post/c_editor/save.gif" style="cursor:pointer;" align="absmiddle"></span></td>
	</tr>
<!--
EOT;
}print<<<EOT
-->
</table>
<div class="cc" style="padding:5px 0 10px 10px;">$pages</div>
</div>
<div class="popBottom">
	<span class="fl"><input type="checkbox" onclick="CheckAll(this.form)" />全选</span>
	<span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form,marked);">删 除</button></span></span>
</div>
</form>
<script id="ajax_viewpinglist">
function editrecord(id) {
	var r = getObj('ping_' + id);
	if (r.style.display == 'none') {
		return;
	}
	r.style.display = 'none';
	getObj('edit_' + id).style.display = '';
}
function savePingLog(id) {
	var record = getObj('editbox_' + id).value; 
	ajax.send('pw_ajax.php?action=savepinglog&id=' + id + '&record=' + record, '', function() {
		var rText = ajax.request.responseText;
		if (rText == 'success') {
			getObj('ping_' + id).innerHTML = record;
			getObj('ping_' + id).style.display = '';
			getObj('edit_' + id).style.display = 'none';
		} else {
			ajax.guide();
		}
	});
}
function ajaxViewPingcp(href) {
	ajax.send(href + '&ajax=1', '', ajax.get);
	return false;
}
</script>
</div>
<!--
EOT;
} elseif ($action == 'inspect') {
if ($iftypeavailable == 1) {print <<<EOT
-->
	<tr class="tr3"><td>后续操作:</td>
		<td><label><input type="checkbox" name="nextto" value="type">&nbsp;转移主题分类</label></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="popBottom"><span class="btn2"><span><button type="button" name="ajaxsubmit" onclick="ajax.submit(this.form);">提 交</button></span></span></div>
</form>
</div>
<!--
EOT;
}?>-->